package com.hpeng.daily.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.hpeng.daily.dao.AssetCardBackUpDao;
import com.hpeng.daily.service.AssetCardBackUpManage;
import com.hpeng.sys.model.AssetCardBackUp;
import com.hpeng.util.Pagination;


@Component("assetCardBackUpManage")
public class AssetCardBackUpManageImpl implements AssetCardBackUpManage{
	@Resource
	private AssetCardBackUpDao assetCardBackUpDao;

	public AssetCardBackUp findAssetCard(String acid) {
		return assetCardBackUpDao.get(acid);
	}

	public List<AssetCardBackUp> getAllAssetCard() {
		return assetCardBackUpDao.getAll();
	}

	public List<AssetCardBackUp> getAllAssetCardByCondition(String hql,
			String order) {
		return assetCardBackUpDao.getByHql(hql+""+order);
	}

	public Pagination<AssetCardBackUp> getPagination(int pageNumber,
			String[] hql, String order) {
		return assetCardBackUpDao.getPagination(pageNumber, hql, order);
	}

	public void updateAssetCard(AssetCardBackUp assetCardBackUp) {
		assetCardBackUpDao.update(assetCardBackUp);
	//	assetCardBookManager.addAssetCardBook(asCardBackUp, oprtStstus, operator, idea, operatename);
	}

	public boolean addAssetCardBackUp(AssetCardBackUp assetCardBackUp) {
		AssetCardBackUp a=assetCardBackUpDao.save(assetCardBackUp);
		
		if (a.equals(null)||a==null) {
			return false;
		}else {
			return true;
		}
		
	}

}
